package com.yanqu.road.logic.sort;


import com.yanqu.road.entity.relatives.RelativesLetter;

import java.util.Comparator;

public class RelativesLetterSort implements Comparator<RelativesLetter> {
    @Override
    public int compare(RelativesLetter o1, RelativesLetter o2) {
        long result = o1.getCreateTime() - o2.getCreateTime();
        if(result > 0){
            return 1;
        }else if(result == 0){
            return 0;
        }else {
            return -1;
        }
    }
}
